package com.ruoyi.bizsys.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bizsys.mapper.BankAccountLogMapper;
import com.ruoyi.bizsys.domain.BankAccountLog;
import com.ruoyi.bizsys.service.IBankAccountLogService;

/**
 * BankAccountLogService业务层处理
 *
 * @author african-loan
 * @date 2021-12-28
 */
@Service
public class BankAccountLogServiceImpl implements IBankAccountLogService {
    @Autowired
    private BankAccountLogMapper bankAccountLogMapper;

    /**
     * 查询BankAccountLog
     *
     * @param id BankAccountLogID
     * @return BankAccountLog
     */
    @Override
    public BankAccountLog selectBankAccountLogById(Long id) {
        return bankAccountLogMapper.selectBankAccountLogById(id);
    }

    /**
     * 查询BankAccountLog列表
     *
     * @param bankAccountLog BankAccountLog
     * @return BankAccountLog
     */
    @Override
    public List<BankAccountLog> selectBankAccountLogList(BankAccountLog bankAccountLog) {
        return bankAccountLogMapper.selectBankAccountLogList(bankAccountLog);
    }

    /**
     * 新增BankAccountLog
     *
     * @param bankAccountLog BankAccountLog
     * @return 结果
     */
    @Override
    public int insertBankAccountLog(BankAccountLog bankAccountLog) {
        bankAccountLog.setCreateTime(DateUtils.getNowDate());
        return bankAccountLogMapper.insertBankAccountLog(bankAccountLog);
    }

    /**
     * 修改BankAccountLog
     *
     * @param bankAccountLog BankAccountLog
     * @return 结果
     */
    @Override
    public int updateBankAccountLog(BankAccountLog bankAccountLog) {
        return bankAccountLogMapper.updateBankAccountLog(bankAccountLog);
    }

    /**
     * 批量删除BankAccountLog
     *
     * @param ids 需要删除的BankAccountLogID
     * @return 结果
     */
    @Override
    public int deleteBankAccountLogByIds(Long[] ids) {
        return bankAccountLogMapper.deleteBankAccountLogByIds(ids);
    }

    /**
     * 删除BankAccountLog信息
     *
     * @param id BankAccountLogID
     * @return 结果
     */
    @Override
    public int deleteBankAccountLogById(Long id) {
        return bankAccountLogMapper.deleteBankAccountLogById(id);
    }

    @Override
    public int selectBindAccountNumByUserId(String userId) {
        return bankAccountLogMapper.selectBindAccountNumByUserId(userId);
    }
}
